#!/bin/bash

[ $# -eq 2 ] || exit 1

tmpfile=/tmp/aw$$.txt
editor=${EDITOR:-`which vi`}
terminal="$2"

antiword "$1" > $tmpfile
chmod -w $tmpfile
$terminal -e $editor $tmpfile
chmod +w $tmpfile
rm $tmpfile
